import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import Props from '@/pages/01-props/Father.vue'
import Emits from '@/pages/02-custom-emits/Father.vue'
import Model from '@/pages/03-v-model/Father.vue'
//创建路由对象
const router = createRouter({
    history:createWebHistory(),//history模式和hash模式
    //配置路由的规则
    //key-路径映射到对应的组件
    routes:[
        {
            path:'/props',
            component:Props
        },{
            path:'/emits',
            component:Emits
        },{
            path:'/model',
            component:Model
        }
    ]
})
//router需要暴露出去
export default router